package com.literature.threeGroup.mapper;

import com.literature.threeGroup.pojo.Purchase;
import com.literature.threeGroup.pojo.PurchaseExample;
import com.literature.threeGroup.pojo.PurchaseWithBLOBs;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.List;
@Component
public interface PurchaseMapper {
    int deleteByPrimaryKey(String id);

    int insert(PurchaseWithBLOBs record);

    int insertSelective(PurchaseWithBLOBs record);

    PurchaseWithBLOBs selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(PurchaseWithBLOBs record);


    int updateByPrimaryKey(Purchase record);

    //我的荐购列表
    List selectByreviewStatus(@Param("reviewStatus") Integer reviewStatus, @Param("reviewStatus1") Integer reviewStatus1);

    //审核列表
    List selectByReviewstatus(Integer sid);

    //修改状态
    void updateReviewStatus(HashMap<String, Integer> map);

    //列表
    List<Purchase> queryPuchase();

    //展示列表
    List<PurchaseWithBLOBs> selectPuchase();

    //完全重复
    List<Purchase> selectRepetition(@Param("title") String title,@Param("pisbn") String pisbn,@Param("pissn") String pissn,@Param("eisbn") String eisbn,@Param("eissn") String eissn);

    //疑似重复
    List<Purchase> selectLikeRepetition(@Param("title") String title,@Param("pisbn") String pisbn,@Param("pissn") String pissn,@Param("eisbn") String eisbn,@Param("eissn") String eissn);

    //模糊
    List<Purchase> queryPuchaseByTitle(String title);

    //提交审核   修改数据的审核状态
    void shenhe(String id);

    //审核最终确认  修改审核状态  为 2 审核完成
    void purchaseComplete(String id);

    //审核确认，   驳回     修改状态为  3
    void purchaseReject(String id);

    //单条荐购  根据id查询
    Purchase selectPurchaseById(String id);
    /**
      * @name  荐购学科统计
     * @Author VULCAN
     * @Date 2020/2/4 16:08
     */
    List<Purchase> selectPuchasesubjectTj();
    /**
     * @name  荐购国家统计
     * @Author VULCAN
     * @Date 2020/2/4 16:08
     */
    List<Purchase> selectPuchasecountryTj();
    /**
     * @name  荐购语种统计
     * @Author VULCAN
     * @Date 2020/2/4 16:08
     */
    List<Purchase> selectPuchaselanguageTj();
    /**
     * @name  荐购文献统计
     * @Author VULCAN
     * @Date 2020/2/4 16:08
     */
    List<Purchase> selectPuchasetypeTj();
    /**
     * @name  荐购币种统计
     * @Author VULCAN
     * @Date 2020/2/4 16:08
     */
    List<Purchase> selectPuchasecurrencyTj();
    /**
     * @name  荐购出版状态统计
     * @Author VULCAN
     * @Date 2020/2/4 16:08
     */
    List<Purchase> selectPuchasepub_statusTj();
    /**
     * @name  荐购载体统计
     * @Author VULCAN
     * @Date 2020/2/4 16:08
     */
    List<Purchase> selectPuchasecarrierTj();
}